# @Author：silence
# @Email：792245022@qq.com
# @Date：2025/2/6 1:06

str_names = "tom jack mary mono smith hsp"

# - 统计一共出多少个人名
str_names_count = len(str_names.split(" "))
print(f"一共出现了 {str_names_count} 次人名")

str_names_replace = str_names.replace("hsp", "韩顺平")
print(f"str_names_replace = {str_names_replace}")

str_names_new = "tom jack mary mono smith hsp 张三"
str_names_upper = " ".join([item.capitalize() if item.isalpha() else item for item in str_names_new.split(" ")])

print(str_names_upper)
